<?php
declare(strict_types=1);

/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */

namespace App\Jobs;

use Hyperf\AsyncQueue\Job;
use App\Service\Message\SendPlayerScreenMsgService;

class PlayerScreenRepush extends Job
{


//    /**
//     * @Inject
//     * @var Sender
//     */
//    protected $sender;

//    use SerializationModel;
//    use Serialization;
    public $id;

    public $screen_id;
    public $message;


    public function __construct($params)
    {
        $screen_id = data_get($params, 'screen_id', '');
        $message = data_get($params, 'message', '');
        $this->screen_id = $screen_id;
        $this->message = $message;
    }

    public function handle(): void
    {
        $sendPlayerScreenMsgService = new SendPlayerScreenMsgService();
        $sendPlayerScreenMsgService->pushPlayerScreenMsg($this->screen_id, $this->message);
    }
}
